<template>
  <div class="travel-page">
    <!-- 固定头部 -->
    <!-- 固定头部 -->
    <div class="fixed-header">
      <h1 class="lock-title">我的旅行</h1>
      <div>
        <el-link type="info" @click="findRecently">最近预定</el-link> -
        <el-link type="info" @click="findAccomplish">已完成</el-link> -
        <el-link type="info" @click="handleFavoriteClick">喜欢</el-link>
      </div>
    </div>
    <!-- 内容区域 -->
    <div @click="hotelwineshop">


    </div>
    <!--    底部导航-->
    <div class="bottom-navigation">
      <button @click="discover"><i class="el-icon-search"></i><br/>发现</button>
      <button @click="travel"><i class="el-icon-star-off"></i><br/>旅行</button>
      <button @click="myProfile"><i class="el-icon-user"></i><br/>我的</button>
    </div>
  </div>
</template>

<script>
const url = 'http://localhost:6001/api';
export default {
  data() {
    return {
      user:{},
    }
  },
  methods: {
    hotelwineshop(){

    },
    findAccomplish(){

    },
    findRecently(){
      this.$router.push(`/travel`);
    },
    handleFavoriteClick(){
      this.$router.push(`/Like`);
    },
    discover() {
      this.$router.push(`/homePage`);
    },
    travel() {
      this.$router.push('/travel');
    },
    myProfile() {
      if (this.$route.path !== '/Wo') {
        this.$router.push('/Wo');
      }
    }
  },
  created() {
    const userStr = sessionStorage.getItem("user");
    this.user = JSON.parse(userStr);
  }
}
</script>

<style scoped>
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 20px 30px 0;
}
.lock-title {
  user-select: none;
  cursor: default;
  font-size: 24px;
  color: #303133;
  margin: 0 0 15px 0;
  padding: 10px 0;
}
</style>
